package com.llkj.contractmanagement.http;

import android.content.Context;
import android.text.TextUtils;

import java.util.HashMap;

/**
 * 封装的网络请求方法
 * <p/>
 * Created by lanli on 2016/5/11.
 */
public class HttpMethod {
    /**
     * 1.1登录
     *
     * @param callBack
     * @param context
     * @param map
     * @param resultCode
     */
    public static void doLogin(ObserverCallBack callBack, Context context, HashMap<String, String> map, int resultCode) {
        AnsynHttpRequest.requestGetOrPost(AnsynHttpRequest.POST, context, UrlConfig.DOLOGIN, map, callBack, resultCode);
    }

    /**
     * 1.2修改密码
     *
     * @param callBack
     * @param context
     * @param map
     * @param resultCode
     */
    public static void updPassword(ObserverCallBack callBack, Context context, HashMap<String, String> map, int resultCode) {
        AnsynHttpRequest.requestGetOrPost(AnsynHttpRequest.POST, context, UrlConfig.UPDPASSWORD, map, callBack, resultCode);
    }

    /**
     * 2.1  影视合同分类列表
     *
     * @param callBack
     * @param context
     * @param map
     * @param resultCode
     */
    public static void ysList(ObserverCallBack callBack, Context context, HashMap<String, String> map, int resultCode) {
        AnsynHttpRequest.requestGetOrPost(AnsynHttpRequest.GET, context, UrlConfig.YS_LIST, map, callBack, resultCode);
    }

    /**
     * 2.2  经济合同分类列表
     *
     * @param callBack
     * @param context
     * @param map
     * @param resultCode
     */
    public static void jjList(ObserverCallBack callBack, Context context, HashMap<String, String> map, int resultCode) {
        AnsynHttpRequest.requestGetOrPost(AnsynHttpRequest.GET, context, UrlConfig.JJ_LIST, map, callBack, resultCode);
    }

    /**
     * 2.3  模板合同分类列表
     *
     * @param callBack
     * @param context
     * @param map
     * @param resultCode
     */
    public static void mbList(ObserverCallBack callBack, Context context, HashMap<String, String> map, int resultCode) {
        AnsynHttpRequest.requestGetOrPost(AnsynHttpRequest.GET, context, UrlConfig.MB_LIST, map, callBack, resultCode);
    }

    /**
     * 2.4  搜索合同
     *
     * @param callBack
     * @param context
     * @param map
     * @param resultCode
     */
    public static void sousuoHT(ObserverCallBack callBack, Context context, HashMap<String, String> map, int resultCode) {
        AnsynHttpRequest.requestGetOrPost(AnsynHttpRequest.GET, context, UrlConfig.SOUSUOHT, map, callBack, resultCode);
    }


    /**
     * 2.5  合同分类详情列表
     *
     * @param callBack
     * @param context
     * @param map
     * @param resultCode
     */
    public static void xqList(ObserverCallBack callBack, Context context, HashMap<String, String> map, int resultCode) {
        AnsynHttpRequest.requestGetOrPost(AnsynHttpRequest.GET, context, UrlConfig.XQ_LIST, map, callBack, resultCode);
    }


    /**
     * 2.6  艺人列表
     *
     * @param callBack
     * @param context
     * @param map
     * @param resultCode
     */
    public static void yrList(ObserverCallBack callBack, Context context, HashMap<String, String> map, int resultCode) {
        AnsynHttpRequest.requestGetOrPost(AnsynHttpRequest.GET, context, UrlConfig.YR_LIST, map, callBack, resultCode);
    }

    /**
     * 2.7  搜索艺人
     *
     * @param callBack
     * @param context
     * @param map
     * @param resultCode
     */
    public static void sousuoYr(ObserverCallBack callBack, Context context, HashMap<String, String> map, int resultCode) {
        AnsynHttpRequest.requestGetOrPost(AnsynHttpRequest.GET, context, UrlConfig.SOUSUOYR, map, callBack, resultCode);
    }

    /**
     * 2.8  姓名搜索艺人
     *
     * @param callBack
     * @param context
     * @param map
     * @param resultCode
     */
    public static void sousuoYrname(ObserverCallBack callBack, Context context, HashMap<String, String> map, int resultCode) {
        AnsynHttpRequest.requestGetOrPost(AnsynHttpRequest.GET, context, UrlConfig.SOUSUOYRNAME, map, callBack, resultCode);
    }

    /**
     * 2.9  艺人图库
     *
     * @param callBack
     * @param context
     * @param map
     * @param resultCode
     */
    public static void yrPic(ObserverCallBack callBack, Context context, HashMap<String, String> map, int resultCode) {
        AnsynHttpRequest.requestGetOrPost(AnsynHttpRequest.GET, context, UrlConfig.YR_PIC, map, callBack, resultCode);
    }

    /**
     * 2.10  艺人详情
     *
     * @param callBack
     * @param context
     * @param map
     * @param resultCode
     */
    public static void yrDetail(ObserverCallBack callBack, Context context, HashMap<String, String> map, int resultCode) {
        AnsynHttpRequest.requestGetOrPost(AnsynHttpRequest.GET, context, UrlConfig.YR_DETAIL, map, callBack, resultCode);
    }

    /**
     * 2.11  合同浏览足迹添加
     *
     * @param callBack
     * @param context
     * @param map
     * @param resultCode
     */
    public static void htZj(ObserverCallBack callBack, Context context, HashMap<String, String> map, int resultCode) {
        AnsynHttpRequest.requestGetOrPost(AnsynHttpRequest.POST, context, UrlConfig.HT_ZJ, map, callBack, resultCode);
    }

    /**
     * 2.12  艺人浏览足迹添加
     *
     * @param callBack
     * @param context
     * @param map
     * @param resultCode
     */
    public static void yrZj(ObserverCallBack callBack, Context context, HashMap<String, String> map, int resultCode) {
        AnsynHttpRequest.requestGetOrPost(AnsynHttpRequest.POST, context, UrlConfig.YR_ZJ, map, callBack, resultCode);
    }

    /**
     * 2.13  收藏足迹
     *
     * @param callBack
     * @param context
     * @param map
     * @param resultCode
     */
    public static void scZj(ObserverCallBack callBack, Context context, HashMap<String, String> map, int resultCode) {
        AnsynHttpRequest.requestGetOrPost(AnsynHttpRequest.POST, context, UrlConfig.SC_ZJ, map, callBack, resultCode);
    }

    /**
     * 2.14  下载足迹
     *
     * @param callBack
     * @param context
     * @param map
     * @param resultCode
     */
    public static void xzZJ(ObserverCallBack callBack, Context context, HashMap<String, String> map, int resultCode) {
        AnsynHttpRequest.requestGetOrPost(AnsynHttpRequest.POST, context, UrlConfig.XZ_ZJ, map, callBack, resultCode);
    }

    /**
     * 3.1  我的资料
     *
     * @param callBack
     * @param context
     * @param map
     * @param resultCode
     */
    public static void info(ObserverCallBack callBack, Context context, HashMap<String, String> map, int resultCode) {
        AnsynHttpRequest.requestGetOrPost(AnsynHttpRequest.GET, context, UrlConfig.INFO, map, callBack, resultCode);
    }

    /**
     * 3.2  修改昵称
     *
     * @param callBack
     * @param context
     * @param map
     * @param resultCode
     */
    public static void updateName(ObserverCallBack callBack, Context context, HashMap<String, String> map, int resultCode) {
        AnsynHttpRequest.requestGetOrPost(AnsynHttpRequest.POST, context, UrlConfig.UPDATENAME, map, callBack, resultCode);
    }

    /**
     * 3.3  修改性别
     *
     * @param callBack
     * @param context
     * @param map
     * @param resultCode
     */
    public static void updateGender(ObserverCallBack callBack, Context context, HashMap<String, String> map, int resultCode) {
        AnsynHttpRequest.requestGetOrPost(AnsynHttpRequest.POST, context, UrlConfig.UPDATEGENDER, map, callBack, resultCode);
    }

    /**
     * 3.4  修改头像
     *
     * @param callBack
     * @param context
     * @param map
     * @param resultCode
     */
    public static void updateLogo(ObserverCallBack callBack, Context context, HashMap<String, String> map, int resultCode) {
        AnsynHttpRequest.requestGetOrPost(AnsynHttpRequest.POST, context, UrlConfig.UPDATELOGO, map, callBack, resultCode);
    }


    /**
     * 3.5  收藏艺人列表
     *
     * @param callBack
     * @param context
     * @param map
     * @param resultCode
     */
    public static void yrCollection(ObserverCallBack callBack, Context context, HashMap<String, String> map, int resultCode) {
        AnsynHttpRequest.requestGetOrPost(AnsynHttpRequest.GET, context, UrlConfig.YRCOLLECTION, map, callBack, resultCode);
    }

    /**
     * 3.6  删除收藏
     *
     * @param callBack
     * @param context
     * @param map
     * @param resultCode
     */
    public static void delCollection(ObserverCallBack callBack, Context context, HashMap<String, String> map, int resultCode) {
        AnsynHttpRequest.requestGetOrPost(AnsynHttpRequest.GET, context, UrlConfig.DELCOLLECTION, map, callBack, resultCode);
    }

    /**
     * 3.7  浏览艺人足迹
     *
     * @param callBack
     * @param context
     * @param map
     * @param resultCode
     */
    public static void zjyr(ObserverCallBack callBack, Context context, HashMap<String, String> map, int resultCode) {
        AnsynHttpRequest.requestGetOrPost(AnsynHttpRequest.GET, context, UrlConfig.ZJ_YR, map, callBack, resultCode);
    }

    /**
     * 3.8  浏览合同足迹
     *
     * @param callBack
     * @param context
     * @param map
     * @param resultCode
     */
    public static void zjht(ObserverCallBack callBack, Context context, HashMap<String, String> map, int resultCode) {
        AnsynHttpRequest.requestGetOrPost(AnsynHttpRequest.GET, context, UrlConfig.ZJ_HT, map, callBack, resultCode);
    }

    /**
     * 3.9  清空艺人足迹
     *
     * @param callBack
     * @param context
     * @param map
     * @param resultCode
     */
    public static void delYrzj(ObserverCallBack callBack, Context context, HashMap<String, String> map, int resultCode) {
        AnsynHttpRequest.requestGetOrPost(AnsynHttpRequest.GET, context, UrlConfig.DEL_YRZJ, map, callBack, resultCode);
    }

    /**
     * 3.10  清空合同足迹
     *
     * @param callBack
     * @param context
     * @param map
     * @param resultCode
     */
    public static void delHtzj(ObserverCallBack callBack, Context context, HashMap<String, String> map, int resultCode) {
        AnsynHttpRequest.requestGetOrPost(AnsynHttpRequest.GET, context, UrlConfig.DEL_HTZJ, map, callBack, resultCode);
    }

    /**
     * 3.11  关于我们
     *
     * @param callBack
     * @param context
     * @param map
     * @param resultCode
     */
    public static void aboutMe(ObserverCallBack callBack, Context context, HashMap<String, String> map, int resultCode) {
        AnsynHttpRequest.requestGetOrPost(AnsynHttpRequest.GET, context, UrlConfig.ABOUTME, map, callBack, resultCode);
    }

    /*2016年8月30日*/

    /**
     * 3.12  意见反馈
     *
     * @param callBack
     * @param context
     * @param map
     * @param resultCode
     */
    public static void feedback(ObserverCallBack callBack, Context context, HashMap<String, String> map, int resultCode) {
        AnsynHttpRequest.requestGetOrPost(AnsynHttpRequest.POST, context, UrlConfig.FEEDBACK, map, callBack, resultCode);
    }

    /**
     * 3.13  版本更新
     *
     * @param callBack
     * @param context
     * @param map
     * @param resultCode
     */
    public static void version(ObserverCallBack callBack, Context context, HashMap<String, String> map, int resultCode) {
        AnsynHttpRequest.requestGetOrPost(AnsynHttpRequest.GET, context, UrlConfig.VERSION, map, callBack, resultCode);
    }

    /**
     * 3.14  系统消息
     *
     * @param callBack
     * @param context
     * @param map
     * @param resultCode
     */
    public static void message(ObserverCallBack callBack, Context context, HashMap<String, String> map, int resultCode) {
        AnsynHttpRequest.requestGetOrPost(AnsynHttpRequest.GET, context, UrlConfig.MESSAGE, map, callBack, resultCode);
    }

    /**
     * 3.15  批量删除收藏
     *
     * @param callBack
     * @param context
     * @param map
     * @param resultCode
     */
    public static void delCollectionAll(ObserverCallBack callBack, Context context, HashMap<String, String> map, int resultCode) {
        AnsynHttpRequest.requestGetOrPost(AnsynHttpRequest.GET, context, UrlConfig.DELCOLLECTIONALL, map, callBack, resultCode);
    }

//    子分类列表请求方法
    /**
     * 2.17  影视合同子分类列表
     *
     * @param callBack
     * @param context
     * @param map
     * @param resultCode
     */
    public static void getChildrenMovieCotract(ObserverCallBack callBack, Context context, HashMap<String, String> map, int resultCode) {
        AnsynHttpRequest.requestGetOrPost(AnsynHttpRequest.GET, context, UrlConfig.YS_LIST1, map, callBack, resultCode);
    }
    /**
     * 2.18  经济合同子分类列表
     *
     * @param callBack
     * @param context
     * @param map
     * @param resultCode
     */
    public static void getChildrenBrokerCotract(ObserverCallBack callBack, Context context, HashMap<String, String> map, int resultCode) {
        AnsynHttpRequest.requestGetOrPost(AnsynHttpRequest.GET, context, UrlConfig.JJ_LIST1, map, callBack, resultCode);
    }
    /**
     * 2.19  模板合同子分类列表
     *
     * @param callBack
     * @param context
     * @param map
     * @param resultCode
     */
    public static void getChildrenModelCotract(ObserverCallBack callBack, Context context, HashMap<String, String> map, int resultCode) {
        AnsynHttpRequest.requestGetOrPost(AnsynHttpRequest.GET, context, UrlConfig.MB_LIST1, map, callBack, resultCode);
    }


}
